package tools;

import java.io.File;




public class GroupFile {
	
	public static void main1(String[] args) throws Exception {
		File dir = new File("E:\\BACKUP\\dreye\\mp3");
		File[] list = dir.listFiles();
		for(File file : list){
			if((file.isFile() && file.canRead())){
				File destDir = new File(dir, ""+Character.toLowerCase(file.getName().charAt(0)));
				destDir.mkdirs();
				File dest = new File(destDir, file.getName());
				file.renameTo(dest);
			}
		}
	}
	
	public static void main(String[] args) throws Exception {
		File dir = new File("E:\\BACKUP\\dreye\\mp3");
		File[] list = dir.listFiles();
		for(File file : list){
			if((file.isDirectory() && file.canRead())){
				System.out.println(file.getName()+" : "+file.list().length);
			}
		}
	}
}
